package com.yiqi.zhiyuan.framework.api;


import android.app.ListActivity;

import com.suozhang.framework.entity.bo.PageData;
import com.suozhang.framework.entity.bo.Result;
import com.yiqi.zhiyuan.entity.dto.ChangeOrderDTO;
import com.yiqi.zhiyuan.entity.dto.ComfirmTripDTO;
import com.yiqi.zhiyuan.entity.dto.TaskDTO;
import com.yiqi.zhiyuan.entity.vo.ChangeReasonVO;
import com.yiqi.zhiyuan.entity.vo.EndPushVO;
import com.yiqi.zhiyuan.entity.vo.OrderVO;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * @ProjectName: ZhiYuan
 * @Description: java类作用描述
 * @Author: lijuwen
 * @CreateDate: 2019/3/24 15:40
 * @UpdateUser: 更新者
 * @UpdateDate: 2019/3/24 15:40
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public interface OrderApi {

    /**
     * 司机订单列表
     */
    @GET("api/driver/selectDriverOrderList/{type}/{pageNo}")
    Observable<Result<PageData<OrderVO>>> getOrderList(@Path("type") int type, @Path("pageNo") int pageNo);

    /**
     * 结束任务
     */
    @POST("api/driver/endTask")
    Observable<Result<EndPushVO>> endTask(@Body TaskDTO taskDTO);

    /**
     * 开始任务
     */
    @POST("api/driver/startTask")
    Observable<Result<String>> startTask(@Body TaskDTO taskDTO);

    /**
     * 订单详情
     */
    @POST("api/driver/selectDriverOrderDetails")
    Observable<Result<OrderVO>> selectDriverOrderDetails(@Body TaskDTO taskDTO);

    /**
     * 到达乘客上车位置
     */
    @POST("api/driver/arriveAtLocation")
    Observable<Result<String>> arriveAtLocation(@Body TaskDTO taskDTO);

    /**
     * 乘客已上车
     */
    @POST("api/driver/passengersGettingOnBus")
    Observable<Result<String>> passengersGettingOnBus(@Body TaskDTO taskDTO);

    /**
     * 立即前往
     * */

    @POST("api/driver/goNow")
    Observable<Result<OrderVO>> goNow(@Body TaskDTO taskDTO);

    /**
     * 确认行程
     * */

    @POST("api/driver/comfirmTrip")
    Observable<Result<String>> comfirmTrip(@Body ComfirmTripDTO taskDTO);

    /**
     * 获取改派原因
     */
    @GET("api/driver/selectRescheduleInfo")
    Observable<Result<List<ChangeReasonVO>>> getOrderReason();
    /**
     * 获取改派原因
     */
    @POST("api/driver/reassignOrder")
    Observable<Result<String>> reassignOrder(@Body ChangeOrderDTO orderDTO );
}
